/**
 * @author ZhangHuihua@msn.com
 */
(function($){
	// jQuery validate
	$.extend($.validator.messages, {
		required: "required",
		remote: "请修正该字段",
		email: "wrong email formate",
		url: "wrong url formate",
		date: "wrong date formate",
		dateISO: "wrong date formate(ISO).",
		number: "wrong number formate",
		digits: "wrong digits formate",
		creditcard: "wrong creditcard formate",
		equalTo: "input save value again",
		accept: "请输入拥有合法后缀名的字符串",
		maxlength: $.validator.format("长度最多是 {0} 的字符串"),
		minlength: $.validator.format("长度最少是 {0} 的字符串"),
		rangelength: $.validator.format("长度介于 {0} 和 {1} 之间的字符串"),
		range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
		max: $.validator.format("请输入一个最大为 {0} 的值"),
		min: $.validator.format("请输入一个最小为 {0} 的值"),
		
		alphanumeric: "must alphanumeric",
		lettersonly: "muste letter",
		phone: "wrong phone formate"
	});
	// DWZ regional
	$.setRegional("datepicker", {
		dayNames: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
		monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December']
	});
	$.setRegional("alertMsg", {
		title:{error:"error", info:"info", warn:"warn", correct:"correct", confirm:"confirm"},
		butMsg:{ok:"ok", yes:"yes", no:"no", cancel:"cancel"}
	});
})(jQuery);